import http from '../index'

// 分页获取派单记录
export const getDispatchRecords = ({ ascended = null, current = null, size = null, sortFieldName = null, dispatcherName = null, dispatchType = null, orderId = null, pickerName = null }) => {
    return http.get("dispatch-notes", { ascended, current, size, sortFieldName, dispatcherName, dispatchType, orderId, pickerName })
}

// 根据sid获取派单记录
export const getDispatchRecordDetail = ({ sid }) => {
    return http.get("dispatch-notes/" + sid)
}

// 修改取货员
export const editDispatchRecord = ({ sid, orderId, pickerId }) => {
    return http.put("dispatch-notes/" + sid, { orderId, pickerId })
}

// 取货员抢单
export const grabbingOrder = ({ orderId }) => {
    return http.put("dispatch-notes/grabbing", { orderId })
}





